package com.mall.service.authority.controller;

import com.mall.autoconfig.interceptor.BaseContext;
import com.mall.feign.clients.TestClients;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Pan Rundong
 * @Date 2023-03-11 10:32
 * @Desc 测试
 */
@RestController
@RequestMapping("test1")
@Slf4j
public class TestController1 {
    @Autowired(required = false)
    private TestClients clients;
    @GetMapping
    public void authorityTest() {
        String currentId = BaseContext.getCurrentId();
        log.info("A模块获取了用户Id，userId = {}", currentId);
        String test = clients.test();
        log.info(test);
    }
}